/*
 * Memory.cpp
 *
 *  Created on: 28/08/2014
 *      Author: santosma
 */

#include "Memory.h"

Memory::Memory(){
	mem = 0;
	maxmem = 0;
}

Memory::~Memory(){}

long Memory::getMem(){
	return mem;
}

long Memory::getMaxMem(){
	return maxmem;
}

void Memory::add(long i, long j){
	mem += i*j;
	maxmem = (maxmem < mem)? mem: maxmem;
}

void Memory::remove(long i, long j){
	mem -= i*j;
}
